<?php
$id = getInput("id",0);
$offset = getInput("offset",0);
$limit = getInput("limit",10);

$user = new User($id);

$content = loadView("user/editAdmin", array("entity" => $user));

$userManager = new User();

$entities = $userManager->getAll("created DESC", $limit, $offset);
$count = $userManager->getAll("created DESC", $limit, $offset, true);

$editUrl = WWWROOT . "admin/users.php?id=";
$content .= "<hr/>";
$content .=loadView("user/list", array("entities" => $entities, "editUrl" => $editUrl));
$content .=  loadView("navigation/pagination", array("offset" => $offset, "limit" => $limit, "count" => $count));

echo loadTemplate("top_menu", langEcho("abm_users"), array("main" => $content));
?>